<template>
	<view class="msgDetail">
		<!-- <view class="title">五一劳动节活动最新攻略</view> -->
		<view class="content">
			<u-parse :html="html" ></u-parse>
		</view>
	</view>
</template>

<script>
	import {
		getMsgDetail
	} from "@/api/user.js"
	import {
		getDicts
	} from "@/api/api.js"
	export default{
		data(){
			return{
				html:'',
				rangeList:[]
			}
		},
		onLoad(options) {
			this.getDetail(options.id)
			this.getDicts()
		},
		methods:{
			dicts(value) {
			    let result = null;
			    this.rangeList.forEach(item => {
			        if (item.dictValue == value) {
			            result = item.dictLabel;
						console.log(result)
			        }
			    });
			    uni.setNavigationBarTitle({
			    	title:result
			    })
			},
			getDicts(){
				getDicts('hhr_notice_type').then(res=>{
					this.rangeList = res.data;
				})
			},
			getDetail(id){
				getMsgDetail({
					id
				}).then(res=>{
					this.detail = res.data
					this.html = res.data.noticeContent
					this.dicts(res.data.noticeType)
					
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.msgDetail{
		padding: 32rpx 24rpx;
		.title{
			font-family: PingFangSC;
			font-weight: 500;
			font-size: 36rpx;
			color: #292929;
			line-height: 52rpx;
			text-align: left;
			font-style: normal;
			margin-bottom: 24rpx;
		}
		.content{
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 28rpx;
			color: #666666;
			line-height: 44rpx;
			font-style: normal;
			text-align: justify;
		}
	}
</style>